package router

import (
	"github.com/gin-gonic/gin"
	"user_bff/api"
	"user_bff/middlerware"
)

func InitUserRouter(r *gin.Engine) {
	v1 := r.Group("user")
	{
		//用户注册接口
		v1.POST("", api.RegisterUser)
		//用户登录接口
		v1.POST("login", api.LoginUser)
		//用户列表接口
		v1.GET("", middlerware.CheckToken(), api.GetUserList)
		//刷新令牌
		v1.POST("/refresh_token", api.RefreshToken)

	}
	r.GET("health", api.Health)
}
